# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=gmsadumper
_pkgname=gMSADumper
pkgver=18.e03187c
pkgrel=5
pkgdesc='A tool that Reads any gMSA password blobs the user can access and parses the values.'
arch=('any')
groups=('blackarch' 'blackarch-misc')
url='https://github.com/micahvandeusen/gMSADumper'
license=('GPL3')
depends=('python' 'python-ldap3' 'impacket' 'python-pycryptodomex')
makedepends=('git')
source=("git+https://github.com/micahvandeusen/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 755 "$_pkgname.py" "$pkgdir/usr/bin/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" *.md
}

